<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./template/template.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui">

    <ui:define name="content">
        <p:panel header="#{mbFilm.newFilm?'Add film':'Edit film'}">
            <form id="form">
                <table>
                    <tr>
                        <td>
                            <h:outputText value="Title:"/>
                        </td>
                        <td>
                            <p:inputText value="#{mbFilm.film.name}"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputText value="Image:"/>
                        </td>
                        <td>
                            <p:fileUpload  />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputText value="Description:"/>
                        </td>
                        <td>
                            <p:inputTextarea value="#{mbFilm.film.description}"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputText value="Quotes"/>
                        </td>
                        <td>
                            <p:inputTextarea value="#{mbFilm.film.quotes}"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputText value="Duration:"/>
                        </td>
                        <td>
                            <p:inputText value="#{mbFilm.film.duration}"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputText value="IMDB link:"/>
                        </td>
                        <td>
                            <p:inputText value="#{mbFilm.film.imdbLink}"/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <h:outputText value="Amazon link:"/>
                        </td>
                        <td>
                            <p:inputText value="#{mbFilm.film.amazonLink}"/>
                        </td>
                    </tr>
                </table>
            </form>
        </p:panel>
    </ui:define>

</ui:composition>
